Optimal. Leaf size=175 \[ -\frac {2 d^3 \cos ^3(a+b x)}{27 b^4}-\frac {40 d^3 \cos (a+b x)}{9 b^4}-\frac {40 d^2 (c+d x) \sin (a+b x)}{9 b^3}-\frac {2 d^2 (c+d x) \sin (a+b x) \cos ^2(a+b x)}{9 b^3}+\frac {d (c+d x)^2 \cos ^3(a+b x)}{3 b^2}+\frac {2 d (c+d x)^2 \cos (a+b x)}{b^2}+\frac {2 (c+d x)^3 \sin (a+b x)}{3 b}+\frac {(c+d x)^3 \sin (a+b x) \cos ^2(a+b x)}{3 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.16, antiderivative size = 175, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3311, 3296, 2638, 3310} \[ -\frac {40 d^2 (c+d x) \sin (a+b x)}{9 b^3}-\frac {2 d^2 (c+d x) \sin (a+b x) \cos ^2(a+b x)}{9 b^3}+\frac {d (c+d x)^2 \cos ^3(a+b x)}{3 b^2}+\frac {2 d (c+d x)^2 \cos (a+b x)}{b^2}-\frac {2 d^3 \cos ^3(a+b x)}{27 b^4}-\frac {40 d^3 \cos (a+b x)}{9 b^4}+\frac {2 (c+d x)^3 \sin (a+b x)}{3 b}+\frac {(c+d x)^3 \sin (a+b x) \cos ^2(a+b x)}{3 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2638
Rule 3296
Rule 3310
Rule 3311
Rubi steps
\begin {align*} \int (c+d x)^3 \cos ^3(a+b x) \, dx &=\frac {d (c+d x)^2 \cos ^3(a+b x)}{3 b^2}+\frac {(c+d x)^3 \cos ^2(a+b x) \sin (a+b x)}{3 b}+\frac {2}{3} \int (c+d x)^3 \cos (a+b x) \, dx-\frac {\left (2 d^2\right ) \int (c+d x) \cos ^3(a+b x) \, dx}{3 b^2}\\ &=-\frac {2 d^3 \cos ^3(a+b x)}{27 b^4}+\frac {d (c+d x)^2 \cos ^3(a+b x)}{3 b^2}+\frac {2 (c+d x)^3 \sin (a+b x)}{3 b}-\frac {2 d^2 (c+d x) \cos ^2(a+b x) \sin (a+b x)}{9 b^3}+\frac {(c+d x)^3 \cos ^2(a+b x) \sin (a+b x)}{3 b}-\frac {(2 d) \int (c+d x)^2 \sin (a+b x) \, dx}{b}-\frac {\left (4 d^2\right ) \int (c+d x) \cos (a+b x) \, dx}{9 b^2}\\ &=\frac {2 d (c+d x)^2 \cos (a+b x)}{b^2}-\frac {2 d^3 \cos ^3(a+b x)}{27 b^4}+\frac {d (c+d x)^2 \cos ^3(a+b x)}{3 b^2}-\frac {4 d^2 (c+d x) \sin (a+b x)}{9 b^3}+\frac {2 (c+d x)^3 \sin (a+b x)}{3 b}-\frac {2 d^2 (c+d x) \cos ^2(a+b x) \sin (a+b x)}{9 b^3}+\frac {(c+d x)^3 \cos ^2(a+b x) \sin (a+b x)}{3 b}-\frac {\left (4 d^2\right ) \int (c+d x) \cos (a+b x) \, dx}{b^2}+\frac {\left (4 d^3\right ) \int \sin (a+b x) \, dx}{9 b^3}\\ &=-\frac {4 d^3 \cos (a+b x)}{9 b^4}+\frac {2 d (c+d x)^2 \cos (a+b x)}{b^2}-\frac {2 d^3 \cos ^3(a+b x)}{27 b^4}+\frac {d (c+d x)^2 \cos ^3(a+b x)}{3 b^2}-\frac {40 d^2 (c+d x) \sin (a+b x)}{9 b^3}+\frac {2 (c+d x)^3 \sin (a+b x)}{3 b}-\frac {2 d^2 (c+d x) \cos ^2(a+b x) \sin (a+b x)}{9 b^3}+\frac {(c+d x)^3 \cos ^2(a+b x) \sin (a+b x)}{3 b}+\frac {\left (4 d^3\right ) \int \sin (a+b x) \, dx}{b^3}\\ &=-\frac {40 d^3 \cos (a+b x)}{9 b^4}+\frac {2 d (c+d x)^2 \cos (a+b x)}{b^2}-\frac {2 d^3 \cos ^3(a+b x)}{27 b^4}+\frac {d (c+d x)^2 \cos ^3(a+b x)}{3 b^2}-\frac {40 d^2 (c+d x) \sin (a+b x)}{9 b^3}+\frac {2 (c+d x)^3 \sin (a+b x)}{3 b}-\frac {2 d^2 (c+d x) \cos ^2(a+b x) \sin (a+b x)}{9 b^3}+\frac {(c+d x)^3 \cos ^2(a+b x) \sin (a+b x)}{3 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.96, size = 121, normalized size = 0.69 \[ \frac {243 d \cos (a+b x) \left (b^2 (c+d x)^2-2 d^2\right )+d \cos (3 (a+b x)) \left (9 b^2 (c+d x)^2-2 d^2\right )+6 b (c+d x) \sin (a+b x) \left (\cos (2 (a+b x)) \left (3 b^2 (c+d x)^2-2 d^2\right )+15 b^2 (c+d x)^2-82 d^2\right )}{108 b^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.70, size = 227, normalized size = 1.30 \[ \frac {{\left (9 \, b^{2} d^{3} x^{2} + 18 \, b^{2} c d^{2} x + 9 \, b^{2} c^{2} d - 2 \, d^{3}\right )} \cos \left (b x + a\right )^{3} + 6 \, {\left (9 \, b^{2} d^{3} x^{2} + 18 \, b^{2} c d^{2} x + 9 \, b^{2} c^{2} d - 20 \, d^{3}\right )} \cos \left (b x + a\right ) + 3 \, {\left (6 \, b^{3} d^{3} x^{3} + 18 \, b^{3} c d^{2} x^{2} + 6 \, b^{3} c^{3} - 40 \, b c d^{2} + {\left (3 \, b^{3} d^{3} x^{3} + 9 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{3} - 2 \, b c d^{2} + {\left (9 \, b^{3} c^{2} d - 2 \, b d^{3}\right )} x\right )} \cos \left (b x + a\right )^{2} + 2 \, {\left (9 \, b^{3} c^{2} d - 20 \, b d^{3}\right )} x\right )} \sin \left (b x + a\right )}{27 \, b^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.42, size = 231, normalized size = 1.32 \[ \frac {{\left (9 \, b^{2} d^{3} x^{2} + 18 \, b^{2} c d^{2} x + 9 \, b^{2} c^{2} d - 2 \, d^{3}\right )} \cos \left (3 \, b x + 3 \, a\right )}{108 \, b^{4}} + \frac {9 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + b^{2} c^{2} d - 2 \, d^{3}\right )} \cos \left (b x + a\right )}{4 \, b^{4}} + \frac {{\left (3 \, b^{3} d^{3} x^{3} + 9 \, b^{3} c d^{2} x^{2} + 9 \, b^{3} c^{2} d x + 3 \, b^{3} c^{3} - 2 \, b d^{3} x - 2 \, b c d^{2}\right )} \sin \left (3 \, b x + 3 \, a\right )}{36 \, b^{4}} + \frac {3 \, {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + b^{3} c^{3} - 6 \, b d^{3} x - 6 \, b c d^{2}\right )} \sin \left (b x + a\right )}{4 \, b^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.03, size = 560, normalized size = 3.20 \[ \frac {\frac {d^{3} \left (\frac {\left (b x +a \right )^{3} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+2 \left (b x +a \right )^{2} \cos \left (b x +a \right )-\frac {40 \cos \left (b x +a \right )}{9}-4 \left (b x +a \right ) \sin \left (b x +a \right )+\frac {\left (b x +a \right )^{2} \left (\cos ^{3}\left (b x +a \right )\right )}{3}-\frac {2 \left (b x +a \right ) \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{9}-\frac {2 \left (\cos ^{3}\left (b x +a \right )\right )}{27}\right )}{b^{3}}-\frac {3 a \,d^{3} \left (\frac {\left (b x +a \right )^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}-\frac {4 \sin \left (b x +a \right )}{3}+\frac {4 \left (b x +a \right ) \cos \left (b x +a \right )}{3}+\frac {2 \left (b x +a \right ) \left (\cos ^{3}\left (b x +a \right )\right )}{9}-\frac {2 \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{27}\right )}{b^{3}}+\frac {3 c \,d^{2} \left (\frac {\left (b x +a \right )^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}-\frac {4 \sin \left (b x +a \right )}{3}+\frac {4 \left (b x +a \right ) \cos \left (b x +a \right )}{3}+\frac {2 \left (b x +a \right ) \left (\cos ^{3}\left (b x +a \right )\right )}{9}-\frac {2 \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{27}\right )}{b^{2}}+\frac {3 a^{2} d^{3} \left (\frac {\left (b x +a \right ) \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+\frac {\left (\cos ^{3}\left (b x +a \right )\right )}{9}+\frac {2 \cos \left (b x +a \right )}{3}\right )}{b^{3}}-\frac {6 a c \,d^{2} \left (\frac {\left (b x +a \right ) \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+\frac {\left (\cos ^{3}\left (b x +a \right )\right )}{9}+\frac {2 \cos \left (b x +a \right )}{3}\right )}{b^{2}}+\frac {3 c^{2} d \left (\frac {\left (b x +a \right ) \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}+\frac {\left (\cos ^{3}\left (b x +a \right )\right )}{9}+\frac {2 \cos \left (b x +a \right )}{3}\right )}{b}-\frac {a^{3} d^{3} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3 b^{3}}+\frac {a^{2} c \,d^{2} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{b^{2}}-\frac {a \,c^{2} d \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{b}+\frac {c^{3} \left (2+\cos ^{2}\left (b x +a \right )\right ) \sin \left (b x +a \right )}{3}}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.56, size = 535, normalized size = 3.06 \[ -\frac {36 \, {\left (\sin \left (b x + a\right )^{3} - 3 \, \sin \left (b x + a\right )\right )} c^{3} - \frac {108 \, {\left (\sin \left (b x + a\right )^{3} - 3 \, \sin \left (b x + a\right )\right )} a c^{2} d}{b} + \frac {108 \, {\left (\sin \left (b x + a\right )^{3} - 3 \, \sin \left (b x + a\right )\right )} a^{2} c d^{2}}{b^{2}} - \frac {36 \, {\left (\sin \left (b x + a\right )^{3} - 3 \, \sin \left (b x + a\right )\right )} a^{3} d^{3}}{b^{3}} - \frac {9 \, {\left (3 \, {\left (b x + a\right )} \sin \left (3 \, b x + 3 \, a\right ) + 27 \, {\left (b x + a\right )} \sin \left (b x + a\right ) + \cos \left (3 \, b x + 3 \, a\right ) + 27 \, \cos \left (b x + a\right )\right )} c^{2} d}{b} + \frac {18 \, {\left (3 \, {\left (b x + a\right )} \sin \left (3 \, b x + 3 \, a\right ) + 27 \, {\left (b x + a\right )} \sin \left (b x + a\right ) + \cos \left (3 \, b x + 3 \, a\right ) + 27 \, \cos \left (b x + a\right )\right )} a c d^{2}}{b^{2}} - \frac {9 \, {\left (3 \, {\left (b x + a\right )} \sin \left (3 \, b x + 3 \, a\right ) + 27 \, {\left (b x + a\right )} \sin \left (b x + a\right ) + \cos \left (3 \, b x + 3 \, a\right ) + 27 \, \cos \left (b x + a\right )\right )} a^{2} d^{3}}{b^{3}} - \frac {3 \, {\left (6 \, {\left (b x + a\right )} \cos \left (3 \, b x + 3 \, a\right ) + 162 \, {\left (b x + a\right )} \cos \left (b x + a\right ) + {\left (9 \, {\left (b x + a\right )}^{2} - 2\right )} \sin \left (3 \, b x + 3 \, a\right ) + 81 \, {\left ({\left (b x + a\right )}^{2} - 2\right )} \sin \left (b x + a\right )\right )} c d^{2}}{b^{2}} + \frac {3 \, {\left (6 \, {\left (b x + a\right )} \cos \left (3 \, b x + 3 \, a\right ) + 162 \, {\left (b x + a\right )} \cos \left (b x + a\right ) + {\left (9 \, {\left (b x + a\right )}^{2} - 2\right )} \sin \left (3 \, b x + 3 \, a\right ) + 81 \, {\left ({\left (b x + a\right )}^{2} - 2\right )} \sin \left (b x + a\right )\right )} a d^{3}}{b^{3}} - \frac {{\left ({\left (9 \, {\left (b x + a\right )}^{2} - 2\right )} \cos \left (3 \, b x + 3 \, a\right ) + 243 \, {\left ({\left (b x + a\right )}^{2} - 2\right )} \cos \left (b x + a\right ) + 3 \, {\left (3 \, {\left (b x + a\right )}^{3} - 2 \, b x - 2 \, a\right )} \sin \left (3 \, b x + 3 \, a\right ) + 81 \, {\left ({\left (b x + a\right )}^{3} - 6 \, b x - 6 \, a\right )} \sin \left (b x + a\right )\right )} d^{3}}{b^{3}}}{108 \, b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.72, size = 364, normalized size = 2.08 \[ \frac {7\,d^3\,x^2\,{\cos \left (a+b\,x\right )}^3}{3\,b^2}-\frac {2\,{\sin \left (a+b\,x\right )}^3\,\left (20\,c\,d^2-3\,b^2\,c^3\right )}{9\,b^3}-\frac {{\cos \left (a+b\,x\right )}^2\,\sin \left (a+b\,x\right )\,\left (14\,c\,d^2-3\,b^2\,c^3\right )}{3\,b^3}-\frac {2\,\cos \left (a+b\,x\right )\,{\sin \left (a+b\,x\right )}^2\,\left (20\,d^3-9\,b^2\,c^2\,d\right )}{9\,b^4}-\frac {2\,x\,{\sin \left (a+b\,x\right )}^3\,\left (20\,d^3-9\,b^2\,c^2\,d\right )}{9\,b^3}-\frac {{\cos \left (a+b\,x\right )}^3\,\left (122\,d^3-63\,b^2\,c^2\,d\right )}{27\,b^4}+\frac {2\,d^3\,x^3\,{\sin \left (a+b\,x\right )}^3}{3\,b}+\frac {14\,c\,d^2\,x\,{\cos \left (a+b\,x\right )}^3}{3\,b^2}-\frac {x\,{\cos \left (a+b\,x\right )}^2\,\sin \left (a+b\,x\right )\,\left (14\,d^3-9\,b^2\,c^2\,d\right )}{3\,b^3}+\frac {d^3\,x^3\,{\cos \left (a+b\,x\right )}^2\,\sin \left (a+b\,x\right )}{b}+\frac {2\,d^3\,x^2\,\cos \left (a+b\,x\right )\,{\sin \left (a+b\,x\right )}^2}{b^2}+\frac {2\,c\,d^2\,x^2\,{\sin \left (a+b\,x\right )}^3}{b}+\frac {3\,c\,d^2\,x^2\,{\cos \left (a+b\,x\right )}^2\,\sin \left (a+b\,x\right )}{b}+\frac {4\,c\,d^2\,x\,\cos \left (a+b\,x\right )\,{\sin \left (a+b\,x\right )}^2}{b^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 4.19, size = 495, normalized size = 2.83 \[ \begin {cases} \frac {2 c^{3} \sin ^{3}{\left (a + b x \right )}}{3 b} + \frac {c^{3} \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{b} + \frac {2 c^{2} d x \sin ^{3}{\left (a + b x \right )}}{b} + \frac {3 c^{2} d x \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{b} + \frac {2 c d^{2} x^{2} \sin ^{3}{\left (a + b x \right )}}{b} + \frac {3 c d^{2} x^{2} \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{b} + \frac {2 d^{3} x^{3} \sin ^{3}{\left (a + b x \right )}}{3 b} + \frac {d^{3} x^{3} \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{b} + \frac {2 c^{2} d \sin ^{2}{\left (a + b x \right )} \cos {\left (a + b x \right )}}{b^{2}} + \frac {7 c^{2} d \cos ^{3}{\left (a + b x \right )}}{3 b^{2}} + \frac {4 c d^{2} x \sin ^{2}{\left (a + b x \right )} \cos {\left (a + b x \right )}}{b^{2}} + \frac {14 c d^{2} x \cos ^{3}{\left (a + b x \right )}}{3 b^{2}} + \frac {2 d^{3} x^{2} \sin ^{2}{\left (a + b x \right )} \cos {\left (a + b x \right )}}{b^{2}} + \frac {7 d^{3} x^{2} \cos ^{3}{\left (a + b x \right )}}{3 b^{2}} - \frac {40 c d^{2} \sin ^{3}{\left (a + b x \right )}}{9 b^{3}} - \frac {14 c d^{2} \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{3 b^{3}} - \frac {40 d^{3} x \sin ^{3}{\left (a + b x \right )}}{9 b^{3}} - \frac {14 d^{3} x \sin {\left (a + b x \right )} \cos ^{2}{\left (a + b x \right )}}{3 b^{3}} - \frac {40 d^{3} \sin ^{2}{\left (a + b x \right )} \cos {\left (a + b x \right )}}{9 b^{4}} - \frac {122 d^{3} \cos ^{3}{\left (a + b x \right )}}{27 b^{4}} & \text {for}\: b \neq 0 \\\left (c^{3} x + \frac {3 c^{2} d x^{2}}{2} + c d^{2} x^{3} + \frac {d^{3} x^{4}}{4}\right ) \cos ^{3}{\relax (a )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________